
export const appnameColumns = _this => [
  {
    title: '应用名',
    key: 'app_name',
    sortable: true,
    render: (h, { row }) => {
      return <router-link to={'/app/appname/' + row.id} style='color: #2d8cf0'>{row.appName}</router-link>
    }
  },
  {
    title: '应用中文名',
    key: 'app_name_cn',
    sortable: true,
    render: (h, { row }) => {
      return <span>{row.appNameCn}</span>
    }
  },
  {
    title: '应用Owner',
    key: 'app_owner',
    sortable: true,
    render: (h, { row }) => {
      return <span>{row.appOwner}</span>
    }
  },
  {
    title: '所属部门',
    key: 'department',
    sortable: true,
    render: (h, { row }) => {
      return <span>{row.departmentInfo.name}</span>
    }
  },
  {
    title: 'Node数量',
    key: 'nodes',
    render: (h, { row }) => {
      return <span>{row.nodes.length}</span>
    }
  },
  {
    title: '操作',
    key: 'operate',
    width: 120,
    render: (h, { row }) => {
      return <div>
        <el-tooltip className='item' effect='dark' content='修改' placement='top-end'>
          <el-link
            underline={false}
            vOn:click={() => {
              _this.showAppnameActionModal = true
              _this.appnameInfo = row
              _this.action.type = 'update'
              _this.action.title = '更新'
            }} size='small' type='primary'>修改
          </el-link>
        </el-tooltip>
        <el-divider direction='vertical' />
        <el-tooltip className='item' effect='dark' content='删除' placement='top-end'>
          <el-link
            underline={false}
            vOn:click={() => {
              _this.showAppnameDeleteModal = true
              _this.appnameInfo = row
            }} size='small' style='font-size:13px;' type='danger'>删除
          </el-link>
        </el-tooltip>
      </div>
    }
  }
]
